/**
 * Copyright 2013 ABSir's Studio
 * 
 * All right reserved
 *
 * Create on 2013-6-20 下午3:17:55
 */
package com.absir.bean.basis;

import java.lang.reflect.Type;
import java.util.List;

import com.absir.core.kernel.KernelLang.FilterTemplate;

/**
 * @author absir
 * 
 */
public interface BeanFactory {

	/**
	 * @param beanName
	 * @return
	 */
	public Object getBeanObject(String beanName);

	/**
	 * @param beanType
	 * @return
	 */
	public Object getBeanObject(Class<?> beanType);

	/**
	 * @param beanName
	 * @param beanType
	 * @return
	 */
	public Object getBeanObject(String beanName, Class<?> beanType);

	/**
	 * @param beanName
	 * @param beanType
	 * @param forcible
	 * @return
	 */
	public Object getBeanObject(String beanName, Class<?> beanType, boolean forcible);

	/**
	 * @param beanName
	 * @param beanType
	 * @param forcible
	 * @return
	 */
	public Object getBeanObject(String beanName, Type beanType, boolean forcible);

	/**
	 * @param beanType
	 * @return
	 */
	public List<Object> getBeanObjects(Class<?> beanType);

	/**
	 * @param beanObject
	 */
	public void processBeanObject(Object beanObject);

	/**
	 * @param beanScope
	 * @param beanObject
	 */
	public void processBeanObject(BeanScope beanScope, Object beanObject);

	/**
	 * @param beanType
	 * @return
	 */
	public List<Object> getSoftReferenceBeans(Class<?> beanType);

	/**
	 * @param filter
	 * @return
	 */
	public List<Object> getSoftReferenceBeans(FilterTemplate<Object> filter);

	/**
	 * @param beanObject
	 */
	public void registerBeanObject(Object beanObject);

	/**
	 * @param beanName
	 * @param beanObject
	 */
	public void registerBeanObject(String beanName, Object beanObject);

	/**
	 * @param beanName
	 * @param beanScope
	 * @param beanObject
	 */
	public void registerBeanObject(String beanName, BeanScope beanScope, Object beanObject);

	/**
	 * @param beanObject
	 */
	public void unRegisterBeanObject(Object beanObject);

	/**
	 * @param beanName
	 */
	public void unRegisterBeanObject(String beanName);

	/**
	 * @param beanName
	 * @param beanObject
	 */
	public void unRegisterBeanObject(String beanName, Object beanObject);

	/**
	 * @param beanObject
	 */
	public void registerBeanSoftObject(Object beanObject);

	/**
	 * @param beanObject
	 */
	public void unRegisterBeanSoftObject(Object beanObject);
}
